exports.editDocs = function (req, res) {
    
    var id = req.query.id;

    var categoryData = [];

    var apiData = {};

    //获取分类
    var sql = "select * from docs_category";

        sqliteDb.all(sql,function(err,data){

            if(err){
                return RES.errorResponse(res,"抱歉，文档分类获取失败");
            }

            categoryData = data;

            //获取接口详细信息
            R.SEND_HTTP(
                req,
                res,
                {
                    url: LocalServer + '/docs/search',
                    method : 'POST',
                    data : {
                        d_id : id
                    }
                },
                function (data) {

                    apiData = data.result;

                    //处理请求参数信息
                    var paramsArr = apiData.getParams.concat(apiData.postParams);

                    apiData.params = paramsArr;

                    delete apiData.getParams;
                    delete apiData.postParams;

                    console.log(apiData);

                    Render.viewRender(req,res,'editDocs',{title:"新增文档页",categoryData:categoryData,apiData:apiData })
        
        
                }
            )
    });
 
    
}